﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 库存盘点基础输入参数
/// </summary>
public class InventorycountsBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 盘点单号
    /// </summary>
    public virtual string? CountNumber { get; set; }
    
    /// <summary>
    /// 盘点类型
    /// </summary>
    public virtual long? InventoryTypeId { get; set; }
    
    /// <summary>
    /// 盘点开始时间
    /// </summary>
    public virtual DateTime? InventoryStartTime { get; set; }
    
    /// <summary>
    /// 盘点结束时间
    /// </summary>
    public virtual DateTime? InventoryEndTime { get; set; }
    
    /// <summary>
    /// 仓库名称
    /// </summary>
    public virtual long? RepositoryNameId { get; set; }
    
    /// <summary>
    /// 所在部门
    /// </summary>
    public virtual long? Department { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>
    public virtual long? Attn { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? Remark { get; set; }
    
    /// <summary>
    /// 制单人
    /// </summary>
    public virtual long? MakeSingle { get; set; }
    
    /// <summary>
    /// 盘点库位
    /// </summary>
    public virtual long? CountLocationsIdId { get; set; }
    
    /// <summary>
    /// 盘点数量
    /// </summary>
    public virtual int? CountQuantity { get; set; }
    
    /// <summary>
    /// 盘盈数量
    /// </summary>
    public virtual int? NumberProfits { get; set; }
    
    /// <summary>
    /// 盘亏数量
    /// </summary>
    public virtual int? NumberLosses { get; set; }
    
    /// <summary>
    /// 盘点状态
    /// </summary>
    public virtual int? InventoryStatus { get; set; }
    
    /// <summary>
    /// 参考单价
    /// </summary>
    public virtual decimal? ParticipationPrice { get; set; }
    
    /// <summary>
    /// 盘点明细备注
    /// </summary>
    public virtual string? InventoryDetailRemarks { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    public virtual string? UploadAttachments { get; set; }
    
}

/// <summary>
/// 库存盘点分页查询输入参数
/// </summary>
public class PageInventorycountsInput : BasePageInput
{
    /// <summary>
    /// 盘点单号
    /// </summary>
    public string? CountNumber { get; set; }
    
    /// <summary>
    /// 盘点类型
    /// </summary>
    public long? InventoryTypeId { get; set; }
    
    /// <summary>
    /// 盘点开始时间范围
    /// </summary>
     public DateTime?[] InventoryStartTimeRange { get; set; }
    
    /// <summary>
    /// 盘点结束时间范围
    /// </summary>
     public DateTime?[] InventoryEndTimeRange { get; set; }
    
    /// <summary>
    /// 仓库名称
    /// </summary>
    public long? RepositoryNameId { get; set; }
    
    /// <summary>
    /// 所在部门
    /// </summary>
    public long? Department { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>
    public long? Attn { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }
    
    /// <summary>
    /// 制单人
    /// </summary>
    public long? MakeSingle { get; set; }
    
    /// <summary>
    /// 盘点库位
    /// </summary>
    public long? CountLocationsIdId { get; set; }
    
    /// <summary>
    /// 盘点数量
    /// </summary>
    public int? CountQuantity { get; set; }
    
    /// <summary>
    /// 盘盈数量
    /// </summary>
    public int? NumberProfits { get; set; }
    
    /// <summary>
    /// 盘亏数量
    /// </summary>
    public int? NumberLosses { get; set; }
    
    /// <summary>
    /// 盘点状态
    /// </summary>
    public int? InventoryStatus { get; set; }
    
    /// <summary>
    /// 参考单价
    /// </summary>
    public decimal? ParticipationPrice { get; set; }
    
    /// <summary>
    /// 盘点明细备注
    /// </summary>
    public string? InventoryDetailRemarks { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    public string? UploadAttachments { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 库存盘点增加输入参数
/// </summary>
public class AddInventorycountsInput
{
    /// <summary>
    /// 盘点单号
    /// </summary>
    [MaxLength(32, ErrorMessage = "盘点单号字符长度不能超过32")]
    public string? CountNumber { get; set; }
    
    /// <summary>
    /// 盘点类型
    /// </summary>
    public long? InventoryTypeId { get; set; }
    
    /// <summary>
    /// 盘点开始时间
    /// </summary>
    public DateTime? InventoryStartTime { get; set; }
    
    /// <summary>
    /// 盘点结束时间
    /// </summary>
    public DateTime? InventoryEndTime { get; set; }
    
    /// <summary>
    /// 仓库名称
    /// </summary>
    public long? RepositoryNameId { get; set; }
    
    /// <summary>
    /// 所在部门
    /// </summary>
    public long? Department { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>
    public long? Attn { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(200, ErrorMessage = "备注字符长度不能超过200")]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 制单人
    /// </summary>
    public long? MakeSingle { get; set; }
    
    /// <summary>
    /// 盘点库位
    /// </summary>
    public long? CountLocationsIdId { get; set; }
    
    /// <summary>
    /// 盘点数量
    /// </summary>
    public int? CountQuantity { get; set; }
    
    /// <summary>
    /// 盘盈数量
    /// </summary>
    public int? NumberProfits { get; set; }
    
    /// <summary>
    /// 盘亏数量
    /// </summary>
    public int? NumberLosses { get; set; }
    
    /// <summary>
    /// 盘点状态
    /// </summary>
    public int? InventoryStatus { get; set; }
    
    /// <summary>
    /// 参考单价
    /// </summary>
    public decimal? ParticipationPrice { get; set; }
    
    /// <summary>
    /// 盘点明细备注
    /// </summary>
    [MaxLength(200, ErrorMessage = "盘点明细备注字符长度不能超过200")]
    public string? InventoryDetailRemarks { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    [MaxLength(2000, ErrorMessage = "上传附件字符长度不能超过2000")]
    public string? UploadAttachments { get; set; }
    
}

/// <summary>
/// 库存盘点删除输入参数
/// </summary>
public class DeleteInventorycountsInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 库存盘点更新输入参数
/// </summary>
public class UpdateInventorycountsInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 盘点单号
    /// </summary>    
    [MaxLength(32, ErrorMessage = "盘点单号字符长度不能超过32")]
    public string? CountNumber { get; set; }
    
    /// <summary>
    /// 盘点类型
    /// </summary>    
    public long? InventoryTypeId { get; set; }
    
    /// <summary>
    /// 盘点开始时间
    /// </summary>    
    public DateTime? InventoryStartTime { get; set; }
    
    /// <summary>
    /// 盘点结束时间
    /// </summary>    
    public DateTime? InventoryEndTime { get; set; }
    
    /// <summary>
    /// 仓库名称
    /// </summary>    
    public long? RepositoryNameId { get; set; }
    
    /// <summary>
    /// 所在部门
    /// </summary>    
    public long? Department { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>    
    public long? Attn { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>    
    [MaxLength(200, ErrorMessage = "备注字符长度不能超过200")]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 制单人
    /// </summary>    
    public long? MakeSingle { get; set; }
    
    /// <summary>
    /// 盘点库位
    /// </summary>    
    public long? CountLocationsIdId { get; set; }
    
    /// <summary>
    /// 盘点数量
    /// </summary>    
    public int? CountQuantity { get; set; }
    
    /// <summary>
    /// 盘盈数量
    /// </summary>    
    public int? NumberProfits { get; set; }
    
    /// <summary>
    /// 盘亏数量
    /// </summary>    
    public int? NumberLosses { get; set; }
    
    /// <summary>
    /// 盘点状态
    /// </summary>    
    public int? InventoryStatus { get; set; }
    
    /// <summary>
    /// 参考单价
    /// </summary>    
    public decimal? ParticipationPrice { get; set; }
    
    /// <summary>
    /// 盘点明细备注
    /// </summary>    
    [MaxLength(200, ErrorMessage = "盘点明细备注字符长度不能超过200")]
    public string? InventoryDetailRemarks { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>    
    [MaxLength(2000, ErrorMessage = "上传附件字符长度不能超过2000")]
    public string? UploadAttachments { get; set; }
    
}

/// <summary>
/// 库存盘点主键查询输入参数
/// </summary>
public class QueryByIdInventorycountsInput : DeleteInventorycountsInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataInventorycountsInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 库存盘点数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportInventorycountsInput : BaseImportInput
{
    /// <summary>
    /// 盘点单号
    /// </summary>
    [ImporterHeader(Name = "盘点单号")]
    [ExporterHeader("盘点单号", Format = "", Width = 25, IsBold = true)]
    public string? CountNumber { get; set; }
    
    /// <summary>
    /// 盘点类型 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? InventoryTypeId { get; set; }
    
    /// <summary>
    /// 盘点类型 文本
    /// </summary>
    [ImporterHeader(Name = "盘点类型")]
    [ExporterHeader("盘点类型", Format = "", Width = 25, IsBold = true)]
    public string InventoryTypeFkDisplayName { get; set; }
    
    /// <summary>
    /// 盘点开始时间
    /// </summary>
    [ImporterHeader(Name = "盘点开始时间")]
    [ExporterHeader("盘点开始时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? InventoryStartTime { get; set; }
    
    /// <summary>
    /// 盘点结束时间
    /// </summary>
    [ImporterHeader(Name = "盘点结束时间")]
    [ExporterHeader("盘点结束时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? InventoryEndTime { get; set; }
    
    /// <summary>
    /// 仓库名称 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? RepositoryNameId { get; set; }
    
    /// <summary>
    /// 仓库名称 文本
    /// </summary>
    [ImporterHeader(Name = "仓库名称")]
    [ExporterHeader("仓库名称", Format = "", Width = 25, IsBold = true)]
    public string RepositoryNameFkDisplayName { get; set; }
    
    /// <summary>
    /// 所在部门 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? Department { get; set; }
    
    /// <summary>
    /// 所在部门 文本
    /// </summary>
    [ImporterHeader(Name = "所在部门")]
    [ExporterHeader("所在部门", Format = "", Width = 25, IsBold = true)]
    public string DepartmentFkDisplayName { get; set; }
    
    /// <summary>
    /// 经办人 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? Attn { get; set; }
    
    /// <summary>
    /// 经办人 文本
    /// </summary>
    [ImporterHeader(Name = "经办人")]
    [ExporterHeader("经办人", Format = "", Width = 25, IsBold = true)]
    public string AttnFkDisplayName { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [ImporterHeader(Name = "备注")]
    [ExporterHeader("备注", Format = "", Width = 25, IsBold = true)]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 制单人 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? MakeSingle { get; set; }
    
    /// <summary>
    /// 制单人 文本
    /// </summary>
    [ImporterHeader(Name = "制单人")]
    [ExporterHeader("制单人", Format = "", Width = 25, IsBold = true)]
    public string MakeSingleFkDisplayName { get; set; }
    
    /// <summary>
    /// 盘点库位 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? CountLocationsIdId { get; set; }
    
    /// <summary>
    /// 盘点库位 文本
    /// </summary>
    [ImporterHeader(Name = "盘点库位")]
    [ExporterHeader("盘点库位", Format = "", Width = 25, IsBold = true)]
    public string CountLocationsFkDisplayName { get; set; }
    
    /// <summary>
    /// 盘点数量
    /// </summary>
    [ImporterHeader(Name = "盘点数量")]
    [ExporterHeader("盘点数量", Format = "", Width = 25, IsBold = true)]
    public int? CountQuantity { get; set; }
    
    /// <summary>
    /// 盘盈数量
    /// </summary>
    [ImporterHeader(Name = "盘盈数量")]
    [ExporterHeader("盘盈数量", Format = "", Width = 25, IsBold = true)]
    public int? NumberProfits { get; set; }
    
    /// <summary>
    /// 盘亏数量
    /// </summary>
    [ImporterHeader(Name = "盘亏数量")]
    [ExporterHeader("盘亏数量", Format = "", Width = 25, IsBold = true)]
    public int? NumberLosses { get; set; }
    
    /// <summary>
    /// 盘点状态
    /// </summary>
    [ImporterHeader(Name = "盘点状态")]
    [ExporterHeader("盘点状态", Format = "", Width = 25, IsBold = true)]
    public int? InventoryStatus { get; set; }
    
    /// <summary>
    /// 参考单价
    /// </summary>
    [ImporterHeader(Name = "参考单价")]
    [ExporterHeader("参考单价", Format = "", Width = 25, IsBold = true)]
    public decimal? ParticipationPrice { get; set; }
    
    /// <summary>
    /// 盘点明细备注
    /// </summary>
    [ImporterHeader(Name = "盘点明细备注")]
    [ExporterHeader("盘点明细备注", Format = "", Width = 25, IsBold = true)]
    public string? InventoryDetailRemarks { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    [ImporterHeader(Name = "上传附件")]
    [ExporterHeader("上传附件", Format = "", Width = 25, IsBold = true)]
    public string? UploadAttachments { get; set; }
    
}
